package BehavioralMode.mediator.MarriageIntermediary;

/**
 * 中介者模式 婚姻中介Demo 客户端
 */
public class Client {

    public static void main(String[] args) {
         SpecificMediator specificMediator = new SpecificMediator();

         Person person1 = new Man("詹姆斯",25, "0001");
         Person person2 = new Man("科比",26, "0002");

         Person person3 = new Woman("丽丽",20, "0003");
         Person person4 = new Woman("花花",21, "0004");
         Person person5 = new Woman("美美",26, "0005");

        specificMediator.register(person1);
        specificMediator.register(person2);
        specificMediator.register(person3);
        specificMediator.register(person4);
        specificMediator.register(person5);

        person1.setPartnerMaxAge(25);
        person1.setPartnerMaxAge(21);

        specificMediator.matching(person1);

    }
}
